package com.atguigu.gulimall.ware.fegin;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @FileName ProductFeign
 * @Description
 * @Author msh
 * @date 2025-10-20
 **/
@FeignClient("gulimall-product")
public interface ProductFeignService {
    /**
     * 1、FeignClient("gulimall-product")
     *   /product/sku/info/{skuId}
     *   直接调product服务的接口
     *
     * 2、FeignClient("gulimall-gateway")
     *    /api/product/sku/info/{skuId}
     *    通过网关访问product服务的接口
     * @param skuId
     * @return
     */
    @RequestMapping("/product/sku/info/{skuId}")
    public R info(@PathVariable("skuId") Long skuId);

}

